package edu.cque.jt.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Hua
 * @create 2022-07-22 17:52
 */
@RestController
@RefreshScope//动态更新配置中心与类属性的值
public class ProviderSecretController {

    @Value("${app.secret:123456}")
    private String secret ;

    @GetMapping("/provider/secret")
    public String doGetSecret(){
        return secret;
    }
}
